/**
 * 
 * @desc   检测是否是合法身份证号
 * @param  {String} String 
 * @return {Boolean}
 */
function isIdCard(value) {
    return /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/.test(value)
}

module.exports = isIdCard;